Electronic devices may measure a depth and/or determine a three-dimensional shape of one or more objects using projected light patterns and a camera system.